package cc.linker.steplink.crm.commons.integral;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: CKQ
 * @DateTime: 2020/8/18 10:52
 * @Description: TODO
 */
public class ActiveConfig {

    //定义所有的方法体
    private static final Map<String,InterfaceInfo> activeList;
    static
    {
        activeList = new HashMap<String, InterfaceInfo>();
        activeList.put("get-customer-info", InterfaceInfo.builder().method("/customer/get-customer-info").mode("get").build());
        activeList.put("add-customer-log", InterfaceInfo.builder().method("/customer/add-customer-log").mode("post").build());
        activeList.put("get-customer-logs",  InterfaceInfo.builder().method("/customer/get-customer-logs").mode("post").build());
        activeList.put("get-customer-ids",  InterfaceInfo.builder().method("/customer/get-customer-ids").mode("post").build());
        activeList.put("get-customers-score",  InterfaceInfo.builder().method("/customer/get-customers-score").mode("post").build());
    }

    //获取方法名称
    public static InterfaceInfo getInterfaceInfo(String active){
        for(String key : activeList.keySet()){
            if(key.equals(active)) {
                return activeList.get(key);
            }
        }
        return null;
    }



}
